aboutsummaryrefslogtreecommitdiff
path: root/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snap...
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-06-27 20:01:55 +0100
committerMichael Williamson <mike@zwobble.org>2023-06-27 20:01:55 +0100
commit88449ac17bf7aad429eb588ec19a0a29d5d90ed4 (patch)
tree20e51275fc5bcf96e030758f363cdf431ba42055 /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
parent6344ee35f1ad6ec6c980fb05b515a60a36ba06e7 (diff)
Allocate memory for closures
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected47
1 files changed, 30 insertions, 17 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
index 3485b7f0..8ef7bbc3 100644
--- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.backends.wasm.WasmCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -6,31 +6,44 @@ Section Details:
Type[2]:
- type[0] (i32) -> i32
- type[1] () -> nil
-Import[2]:
+Import[3]:
- table[0] type=funcref initial=0 <- env.__indirect_function_table
+ - func[0] sig=0 <shed__runtime__alloc> <- env.shed__runtime__alloc
- memory[0] pages: initial=0 <- env.__linear_memory
Function[2]:
- - func[0] sig=0 <shed__function__f__0>
- - func[1] sig=1 <f>
+ - func[1] sig=0 <shed__function__f__0>
+ - func[2] sig=1 <f>
Code[2]:
- - func[0] size=5 <shed__function__f__0>
- - func[1] size=2 <f>
+ - func[1] size=5 <shed__function__f__0>
+ - func[2] size=16 <f>
Custom:
- name: "name"
- - func[0] <shed__function__f__0>
- - func[1] <f>
- - func[0] local[0] <closurePointer__0>
+ - func[0] <shed__runtime__alloc>
+ - func[1] <shed__function__f__0>
+ - func[2] <f>
+ - func[1] local[0] <closurePointer__0>
+ - func[2] local[0] <closurePointer__0>
Custom:
- name: "linking"
- - symbol table [count=2]
- - 0: F <shed__function__f__0> func=0 [ binding=global vis=default ]
- - 1: F <f> func=1 [ binding=global vis=default ]
+ - symbol table [count=3]
+ - 0: F <shed__runtime__alloc> func=0 [ undefined explicit_name binding=global vis=default ]
+ - 1: F <shed__function__f__0> func=1 [ binding=global vis=default ]
+ - 2: F <f> func=2 [ binding=global vis=default ]
+Custom:
+ - name: "reloc.CODE"
+ - relocations for section: 3 (Code) [1]
+ - R_WASM_FUNCTION_INDEX_LEB offset=0x000016(file=0x000097) symbol=0 <shed__runtime__alloc>
Code Disassembly:
-00006c func[0] <shed__function__f__0>:
- 00006d: 41 00 | i32.const 0
- 00006f: 0f | return
- 000070: 0b | end
-000076 func[1] <f>:
- 000077: 0b | end \ No newline at end of file
+000087 func[1] <shed__function__f__0>:
+ 000088: 41 00 | i32.const 0
+ 00008a: 0f | return
+ 00008b: 0b | end
+000091 func[2] <f>:
+ 000092: 01 7f | local[0] type=i32
+ 000094: 41 04 | i32.const 4
+ 000096: 10 80 80 80 80 00 | call 0 <shed__runtime__alloc>
+ 00009c: 21 00 | local.set 0 <closurePointer__0>
+ 00009e: 20 00 | local.get 0 <closurePointer__0>
+ 0000a0: 0b | end \ No newline at end of file